#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;

const int m = 5;
const int n = 3;
const int t = 1;


template<class T>
void PrintMatrix(T a[], int rowNum, int colNum)
{
	for (int i = 0; i < rowNum; i++)
	{
		for (int j = 0; j < colNum; j++)
		{
			cout<<a[i][j] << "\t";
		}
		cout<< "\n";
	}
}


int main(void)
{
	int a[2][3] = {{1, 2, 3}, {4, 5, 6}};
	PrintMatrix(a, 2, 3);
	
	int b[3][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}};
	PrintMatrix(b, 3, 4);
}

